// 获取当前时间
var now=new Date();
console.log(now);
console.log(now.getFullYear(),'当前年份');
console.log(now.getMonth()+1,'获取月份');
console.log(now.getDate(),"月份对应的日期");
console.log(now.getMinutes(),"获取分钟");
console.log(now.getHours(),'获取小时');
console.log(now.getSeconds(),'获取秒数');
console.log(now.getDay(),'返回星期几');
console.log(now.getMilliseconds(),'返回毫秒数');
console.log(now.getTime(),'返回日期中的毫秒数');//时间戳 从格林位置时间1970开始计算